<template>
	<view>
		<!-- 产品模块 -->
		<view class="module-component">
			<view class="productListModule">
				<text class="title">{{title}}</text><!-- @eventClick="onClick" -->
				<Product1 :class="Productid==0?'':'none'" :product="product" ></Product1>
				<Product2 :class="Productid==1?'':'none'" :product="product"></Product2>
				<Product3 :class="Productid==2?'':'none'" :product="product" :cartId="cartId" :bool="true"></Product3>
			</view>
		</view>
	</view>
</template>

<script>
	import Product1 from './product1.vue';
	import Product2 from './product2.vue';
	import Product3 from './product3.vue';
	export default {
		components: {
			Product1,
			Product2,
			Product3,
		},
		name: '',
		props:{
			//标题
			title:{
				type: String,
				default: '——标题——'
			},
			//调用产品模板id
			Productid:{
				type: Number,
				default: 0
			},
			//产品列表
			product:{
				type: Array,
				default: ()=>[]
			},
			//调用按钮模板id
			cartId: {
				type: Number,
				default: 1,
			},
		},
		data() {
			return {

			};
		},
		watch:{
			
		},
		methods:{
			onClick(){
				console.log('113133')
				// this.$emit('eventClick',item)
			},
		},
	}
</script>

<style lang="scss">
	.module-component{
		position: relative;
		width: 100%;
		display: block;
		background: #fff;
		.productListModule{
			
		}
		// image{
		// 	border: 2upx solid #303133;
		// }
		.title{
			height: 100%;
			line-height: 70upx;
			text-align: center;
			border-bottom: 1px solid #eeeef3;
			font-size: 14px;
			background-color: #fff;
			color: #353535;
			display: block;
		}
	}
</style>
